Optimal. Leaf size=36 \[ \frac{2-\cos (x)}{18 \left (\cos ^2(x)-4 \cos (x)+13\right )}-\frac{1}{54} \tan ^{-1}\left (\frac{1}{3} (\cos (x)-2)\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.033036, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.267, Rules used = {3259, 614, 618, 204} \[ \frac{2-\cos (x)}{18 \left (\cos ^2(x)-4 \cos (x)+13\right )}-\frac{1}{54} \tan ^{-1}\left (\frac{1}{3} (\cos (x)-2)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3259
Rule 614
Rule 618
Rule 204
Rubi steps
\begin{align*} \int \frac{\sin (x)}{\left (13-4 \cos (x)+\cos ^2(x)\right )^2} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{\left (13-4 x+x^2\right )^2} \, dx,x,\cos (x)\right )\\ &=\frac{2-\cos (x)}{18 \left (13-4 \cos (x)+\cos ^2(x)\right )}-\frac{1}{18} \operatorname{Subst}\left (\int \frac{1}{13-4 x+x^2} \, dx,x,\cos (x)\right )\\ &=\frac{2-\cos (x)}{18 \left (13-4 \cos (x)+\cos ^2(x)\right )}+\frac{1}{9} \operatorname{Subst}\left (\int \frac{1}{-36-x^2} \, dx,x,-4+2 \cos (x)\right )\\ &=-\frac{1}{54} \tan ^{-1}\left (\frac{1}{3} (-2+\cos (x))\right )+\frac{2-\cos (x)}{18 \left (13-4 \cos (x)+\cos ^2(x)\right )}\\ \end{align*}
Mathematica [A] time = 0.0734964, size = 34, normalized size = 0.94 \[ -\frac{\cos (x)-2}{18 \left (\cos ^2(x)-4 \cos (x)+13\right )}-\frac{1}{54} \tan ^{-1}\left (\frac{1}{3} (\cos (x)-2)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.025, size = 31, normalized size = 0.9 \begin{align*} -{\frac{2\,\cos \left ( x \right ) -4}{468-144\,\cos \left ( x \right ) +36\, \left ( \cos \left ( x \right ) \right ) ^{2}}}-{\frac{1}{54}\arctan \left ( -{\frac{2}{3}}+{\frac{\cos \left ( x \right ) }{3}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.44273, size = 38, normalized size = 1.06 \begin{align*} -\frac{\cos \left (x\right ) - 2}{18 \,{\left (\cos \left (x\right )^{2} - 4 \, \cos \left (x\right ) + 13\right )}} - \frac{1}{54} \, \arctan \left (\frac{1}{3} \, \cos \left (x\right ) - \frac{2}{3}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.40479, size = 139, normalized size = 3.86 \begin{align*} -\frac{{\left (\cos \left (x\right )^{2} - 4 \, \cos \left (x\right ) + 13\right )} \arctan \left (\frac{1}{3} \, \cos \left (x\right ) - \frac{2}{3}\right ) + 3 \, \cos \left (x\right ) - 6}{54 \,{\left (\cos \left (x\right )^{2} - 4 \, \cos \left (x\right ) + 13\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 1.9846, size = 119, normalized size = 3.31 \begin{align*} - \frac{4 \cos ^{2}{\left (x \right )} \operatorname{atan}{\left (\frac{\cos{\left (x \right )}}{3} - \frac{2}{3} \right )}}{216 \cos ^{2}{\left (x \right )} - 864 \cos{\left (x \right )} + 2808} - \frac{3 \cos ^{2}{\left (x \right )}}{216 \cos ^{2}{\left (x \right )} - 864 \cos{\left (x \right )} + 2808} + \frac{16 \cos{\left (x \right )} \operatorname{atan}{\left (\frac{\cos{\left (x \right )}}{3} - \frac{2}{3} \right )}}{216 \cos ^{2}{\left (x \right )} - 864 \cos{\left (x \right )} + 2808} - \frac{52 \operatorname{atan}{\left (\frac{\cos{\left (x \right )}}{3} - \frac{2}{3} \right )}}{216 \cos ^{2}{\left (x \right )} - 864 \cos{\left (x \right )} + 2808} - \frac{15}{216 \cos ^{2}{\left (x \right )} - 864 \cos{\left (x \right )} + 2808} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.47588, size = 38, normalized size = 1.06 \begin{align*} -\frac{\cos \left (x\right ) - 2}{18 \,{\left (\cos \left (x\right )^{2} - 4 \, \cos \left (x\right ) + 13\right )}} - \frac{1}{54} \, \arctan \left (\frac{1}{3} \, \cos \left (x\right ) - \frac{2}{3}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]